package com.zengqingfa.designpattern.behavior.observer.standard;

/**
 *
 * @fileName: Client
 * @author: zengqf3
 * @date: 2021-4-23 15:17
 * @description:
 */
public class Client {

    public static void main(String[] args) {
        /**
         * 被观察者事件发生改变
         * 观察者ConcreteObserver1收到消息:standard标准观察者
         * 观察者ConcreteObserver2收到消息:standard标准观察者
         */
        ConcreteSubject subject = new ConcreteSubject();
        subject.addObserver(new ConcreteObserver1());
        subject.addObserver(new ConcreteObserver2());
        subject.triggle();
    }
}
